<template>

  <div>

    <data-table
      ref="pagingTable"
      :options="options"
      :list-query="listQuery"
    >

      <template slot="filter-content" />

      <template slot="data-columns">

        <el-table-column
          label="客户名称"
          show-overflow-tooltip>

          <template slot-scope="scope">
            <router-link class="router-link" :to="{name: 'CustomerUpdate', params:{id: scope.row.customerId}}">
              {{scope.row.customerId_dictText}}
            </router-link>
          </template>

        </el-table-column>

        <el-table-column
          align="center"
          label="动态类型"
          prop="dataType_dictText"
        />

        <el-table-column
          align="center"
          label="客户经理"
          prop="createBy_dictText"
        />



        <el-table-column
          align="center"
          label="操作时间"
          prop="createTime"
        />

        <el-table-column
          align="center"
          label="动态"
          show-overflow-tooltip
          prop="content">
        </el-table-column>


        <el-table-column
          align="center"
          label="心情">

          <template slot-scope="scope">
            <span v-if="scope.row.mood===1">😀</span>
            <span v-else>😩</span>
          </template>

        </el-table-column>


      </template>
    </data-table>

  </div>

</template>

<script>
import DataTable from '@/components/DataTable'
import permission from '@/directive/permission'
export default {
  directives: { permission },
  components: { DataTable },
  props: {
    customerId: String
  },
  data() {
    return {
      listQuery: {
        current: 1,
        size: 10,
        params: {
          customerId: ''
        }
      },

      options: {

        add: {
          enable: false
        },
        edit: {
          enable: false
        },
        delete: {
          enable: false
        },

        // 列表请求URL
        listUrl: '/api/customer/dynamic/paging'
      }
    }
  },

  watch: {
    customerId: {
      handler(val) {
        this.listQuery.params.customerId = val
      }
    }
  },

  created() {
    this.listQuery.params.customerId = this.customerId
  },

  methods: {

  }
}
</script>
